package com.e2oto.seller.modules.seller.adapter;

import android.content.Context;
import android.widget.ImageView;

import com.e2oto.seller.R;
import com.e2oto.seller.common.base.RecycleViewAdapter;
import com.e2oto.seller.common.base.RecycleViewHolder;
import com.e2oto.seller.common.utils.ImageLoader;
import com.e2oto.seller.modules.seller.bean.PreviewGoodsDetailBean;

import java.util.List;

/**
 * Created by ZhangLiQiang on 2017/11/13.
 */

public class PreviewGoodsAdapter extends RecycleViewAdapter<String> {

    private Context mContext;

    public PreviewGoodsAdapter(List<String> dataList, Context mContext) {
        super(dataList);
        this.mContext = mContext;
    }

    @Override
    public int getLayoutId(int viewType) {
        return R.layout.item_preview_goods_detail;
    }

    @Override
    public void convert(RecycleViewHolder holder, String str, int position) {

        ImageView iv = (ImageView) holder.getView(R.id.item_preview_goods_iv);
        ImageLoader.load(mContext,str, iv);
    }
}
